#ifndef __EFFECT_REVERB_H__
#define __EFFECT_REVERB_H__

#include <QObject>
#include <QWidget>
#include <QLineEdit>
#include <QLabel>
#include <QSlider>
#include <QGridLayout>
#include <QGroupBox>
#include <QCheckBox>

class Effect_Reverb : public QWidget
{
    Q_OBJECT
public:
    explicit Effect_Reverb(QWidget *parent = nullptr);
    ~Effect_Reverb();
private:
    // QLabel    lab_title;
    QLineEdit edit_sli_text_tone;
    QLineEdit edit_sli_text_fadeback;
    QLineEdit edit_sli_text_wet;
    QLineEdit edit_sli_text_dry;
    QLineEdit edit_sli_text_damp;
    QLabel    lab_text_tone;
    QLabel    lab_text_fadeback;
    QLabel    lab_text_wet;
    QLabel    lab_text_dry;
    QLabel    lab_text_damp;
    QSlider   sli_tone;
    QSlider   sli_fadeback;
    QSlider   sli_wet;
    QSlider   sli_dry;
    QSlider   sli_damp;
    QGridLayout layout;
    QLabel    lab_text_enable;
    QCheckBox chk_enable;
    // QGroupBox  group;
    // QVBoxLayout layout_main;

    float min_tone;
    float max_tone;
    float step_tone;
    float min_fadeback;
    float max_fadeback;
    float step_fadeback;
    float min_wet;
    float max_wet;
    float step_wet;
    float min_dry;
    float max_dry;
    float step_dry;
    float min_damp;
    float max_damp;
    float step_damp;

    float tone;
    float fadeback;
    float wet;
    float dry;
    float damp;
private:
    void enable_all(bool en);
public:
    typedef enum{
        Enable = 1,
        Tone ,
        Fadeback,
        Dry,
        Wet,
        Damp
    }PARAM_NAME;
    float set_param(PARAM_NAME param_name,float v);
    float get_param(PARAM_NAME param_name);
    void set_title(const QString &title);
private slots:
    void slot_slider_change_tone(int v);
    void slot_slider_change_fadeback(int v);
    void slot_slider_change_wet(int v);
    void slot_slider_change_dry(int v);
    void slot_slider_change_damp(int v);
    void slot_edit_presed_tone(void);
    void slot_edit_presed_fadeback(void);
    void slot_edit_presed_wet(void);
    void slot_edit_presed_dry(void);
    void slot_edit_presed_damp(void);
    void slot_chk_state_changed(int state);
signals:
    void sig_param_update(PARAM_NAME param_name,float v);
};

#endif // EFFECT_REVERB_H
